package sctu.edu.java.year2016.team05.lizixin.day20160615.LianXi4;

import javax.swing.*;
import java.awt.*;

/**
 * Created by home on 2016/6/15.
 * 13.6
 */
public class FlowLaYoutPosition extends JFrame{
    public FlowLaYoutPosition(){
        setTitle("本窗口使用流布局管理器");
        Container c=getContentPane();
        setLayout(new FlowLayout(2, 10, 10));
        for(int i=0;i<10;i++){
            c.add(new JButton("button"+i));
        }
        setSize(300,200);
        setVisible(true);
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
   }

    public static void main(String[] args) {
        new FlowLaYoutPosition();
    }
}
